<template>
    <div id="alteration">
        <el-table :data="data.list" border style="width: 100%">
        <el-table-column prop="cost_id.cost_type.title" label="换班类型" align="center"></el-table-column>
         <el-table-column prop="change_time" label="换班时间" align="center"></el-table-column>
        <el-table-column prop="former_course" label="原班型" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column prop="present_course" label="现班型" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column prop="course_cost" label="现班型费用" align="center"></el-table-column>
        <el-table-column prop="discounts" label="现班型优惠" align="center"></el-table-column>
         <el-table-column prop="cost_id.operate_user" label="操作人" align="center"></el-table-column>
         <el-table-column prop="create_time" label="操作时间" align="center" width="180"></el-table-column>
         <el-table-column prop="cost_id.approval_user" label="审核人" align="center"></el-table-column>
         <el-table-column prop="update_time" label="审核时间" align="center" width="180"></el-table-column>
         <el-table-column prop="cost_id.status.title" label="状态" align="center"></el-table-column>
    </el-table>
    <!-- 分页组件 -->
    <el-row>
        <el-col :span='12'>
            <span style="color:#fff;">1</span>
        </el-col>
        <el-col :span='12'>
          <el-pagination
          class="fr"
          background
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="data.page.page"
          :page-sizes="[8]"
          :page-size="8"
          layout="total, sizes, prev, pager, next"
          :total="data.page.total">
        </el-pagination>
        </el-col>
    </el-row>
    </div>
</template>


<script>
export default {
    data(){
        return{
          //成绩记录页码
          rpage:1,
          //成绩记录一页多少数据
          rtotal:5,
            tableData:[
                {
                    type:'建档变更',
                    detail:'完成建档',
                    people:'张三',
                    time:'2021-01-17'
                },
                {
                    type:'建档变更',
                    detail:'完成建档',
                    people:'张三',
                    time:'2021-01-17'
                },
                {
                    type:'建档变更',
                    detail:'完成建档',
                    people:'张三',
                    time:'2021-01-17'
                },
                {
                    type:'建档变更',
                    detail:'完成建档',
                    people:'张三',
                    time:'2021-01-17'
                }
            ]
        }
    },
    props:{
      data:{
          type:Object,
          default:()=>{
            return {}
          }
      },
      getrecordList:{
        type:Function,
        default:()=>{
          return {}
        }
      }

    },
    methods:{
      //一页多少数据 翻页
      handleSizeChange(val){
        this.rtotal = val
        //this.getrecordList()
        this.$emit('getrecordList',val)
      },
      //翻页码
      handleCurrentChange(val){
         this.rpage = val
          //this.getrecordList()
           this.$emit('getrecordList',val)
      },
    }
}
</script>

<style scoped lang='scss'>

</style>
